package org.wanda.pv.service.user.impl;

import org.nutz.dao.Cnd;
import org.nutz.dao.Dao;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
import org.wanda.pv.model.hy.*;
import org.wanda.pv.service.BaseServiceImpl;
import org.wanda.pv.service.hy.HyDrawingService;
import org.wanda.pv.service.hy.HyNodeInfoService;
import org.wanda.pv.service.user.HyUserInfoService;
import org.wanda.pv.util.HyUtil;

import java.util.List;

/**
 * @author lxy
 * @date 2018/12/13 10:30
 */

@Service
public class HyUserInfoServiceImpl extends BaseServiceImpl<HyUserInfo> implements HyUserInfoService {
    private Logger logger= LoggerFactory.getLogger(this.getClass());

    @Autowired
    private HyNodeInfoService hyNodeInfoService;
    @Autowired
    private HyDrawingService hyDrawingService;
    public HyUserInfoServiceImpl(Dao dao) {
        super(dao);
    }

    @Async
    @Override
    public void initUserDrawing(HyUserInfo hyUserInfo,String access_token_hy,String projectFlowChildrenNodeId,String projectId) {
        try{
            hyDrawingService.initDrawings(access_token_hy,projectFlowChildrenNodeId,projectId);
            logger.info("\n *********************************************************************");
        }catch (Exception e){
            logger.error(e.getMessage(),e);
        }
    }
}
